﻿<%@ Page Title="" Language="C#" MasterPageFile="~/View/Shared/Window.master" AutoEventWireup="true" CodeFile="CMAEHasReportOfBank.aspx.cs" Inherits="View_CashManager_CMAEHasReportOfBank" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" Runat="Server">
    Giấy báo có (thu) của ngân hàng
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
<script type="text/javascript" src="../../Scripts/ResizeWindow.js"></script>
<script type="text/javascript">
    function RowDblClick(sender, eventArgs)
    {
        sender.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical());
    }
</script>
    <form id="Form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
        <fieldset>
            <table>
                <tr class="alignleft">
                    <td>
                        <label>Loại phiếu thu: </label>
                    </td>
                    
                    <td style="width: 330px">
                        <telerik:RadComboBox runat="server" ID="cbCMHRTypeofFee"/>
                    </td>
                    
                    <td>
                        <label>Ngày hoạch toán: </label>
                    </td>

                    <td>
                        <telerik:RadDatePicker ID="dpCMHRHTDate" runat="server">
                            <ClientEvents OnPopupOpening="AdjustRadWidow" OnPopupClosing="AdjustRadWidow" />
                        </telerik:RadDatePicker>
                    </td>
                </tr>
                <tr class="alignleft">
                    <td>
                        <label>Mã khách: </label>
                    </td>

                    <td>
                        <asp:TextBox ID="txtCMHRCustomerCode" Width="160px" runat="server"/>
                    </td>
                    
                    <td>
                        <label>Ngày lập phiếu thu: </label>
                    </td>

                    <td>
                        <telerik:RadDatePicker ID="dpCMHRLPTDate" runat="server">
                            <ClientEvents OnPopupOpening="AdjustRadWidow" OnPopupClosing="AdjustRadWidow" />
                        </telerik:RadDatePicker>
                    </td>
                </tr>
                <tr class="alignleft">
                    <td>
                        <label>Địa chỉ: </label>
                    </td>

                    <td>
                        <asp:TextBox ID="txtCMHRAddress" Width="300px" runat="server"/>
                    </td>
                    
                    <td>
                        <label>Quyển số: </label>
                    </td>

                    <td>
                        <asp:TextBox ID="txtCMHRBookNo" Width="123px" runat="server"/>
                    </td>
                </tr>
                <tr class="alignleft">
                    <td>
                        <label>Người nộp tiền: </label>
                    </td>

                    <td>
                        <asp:TextBox ID="txtCMHRPeople" Width="300px" runat="server"/>
                    </td>
                    
                    <td>
                        <label>Số phiếu thu: </label>
                    </td>

                    <td>
                        <asp:TextBox ID="txtCMHRFeeNo" Width="123px" runat="server"/>
                    </td>
                </tr>
                <tr class="alignleft">
                    <td>
                        <label>Lý do nộp: </label>
                    </td>

                    <td>
                        <asp:TextBox ID="txtCMHRReason" Width="300px" runat="server"/>
                    </td>
                    
                    <td>
                        <label>Số serial: </label>
                    </td>

                    <td>
                        <asp:TextBox ID="txtCMHRSerialNo" Width="123px" runat="server"/>
                    </td>
                </tr>
                <tr class="alignleft">
                    <td>
                        <label>Tài khoản nợ: </label>
                    </td>

                    <td>
                        <asp:TextBox ID="txtCMHRLiabilityAcc" Width="160px" runat="server"/>
                    </td>
                    
                    <td>
                        <label>Tỷ giá giao dịch: </label>
                    </td>

                    <td>
                        <telerik:RadComboBox runat="server" Width="61px" ID="cbCMHRCurrency"/>
                        &nbsp;
                        <asp:TextBox ID="txtCMHRVND" Width="53px" runat="server" Height="19px" />
                    </td>
                </tr>
                <tr class="alignleft">
                    <td>
                        <label>Hóa đơn liên quan: </label>
                    </td>

                    <td>
                        <asp:TextBox ID="txtCMHRHD" Width="160px" runat="server" />
                        <telerik:RadButton runat="server" Width="26px" ID="bCMHRSearch" Text="+ "/>
                    </td>
                    
                    <td>
                        <label>Hạn thanh toán: </label>
                    </td>

                    <td>
                        <asp:TextBox ID="txtCMHRDeadline" Width="123px" runat="server" />
                    </td>
                </tr>
            </table>
        </fieldset>
        <br />
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="grCMHRAEInfo">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="grCMHRAEInfo" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
        </AjaxSettings>
        </telerik:RadAjaxManager>
        <%--OnUpdateCommand="RadGrid_ItemUpdated" OnItemDeleted="RadGrid_ItemDeleted" OnInsertCommand="RadGrid_ItemInserted"--%>
        <telerik:RadGrid runat="server" ID="grCMHRAEInfo"
            OnPreRender="RadGrid_PreRender" OnInit="RadGrid_Init" OnNeedDataSource="RadGrid_NeedDataSource"
            AllowSorting="True" AllowFilteringByColumn="True" PageSize="10" AllowPaging="True" ClientSettings-Scrolling-AllowScroll="true"
            AutoGenerateColumns="False" AllowMultiRowSelection="true" Skin="Vista">
            
            <GroupingSettings CaseSensitive="false" />

            <MasterTableView DataKeyNames="Id" ClientDataKeyNames="Id" EditMode="InPlace" CommandItemDisplay="Top" 
                CommandItemSettings-AddNewRecordText="Thêm mới" CommandItemSettings-ShowRefreshButton="false">
                <PagerStyle Mode="NumericPages" />
                <Columns>
                    <telerik:GridEditCommandColumn ButtonType="ImageButton" HeaderText="................"
                        EditText="Sửa" InsertText="Lưu" UpdateText="Lưu" CancelText="Hủy" />
                       
                    <telerik:GridClientSelectColumn UniqueName="CheckboxSelectColumn"/>

                    <telerik:GridBoundColumn FilterControlWidth="40px" DataField="No"  HeaderText="STT"/>

                    <telerik:GridBoundColumn DataField="AccountID" HeaderText="Mã tài khoản có"
                        DataType="System.String" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false"/>

                    <telerik:GridBoundColumn DataField="AccountName" HeaderText="Tên tài khoản"
                        DataType="System.String" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false"/>
                    
                    <telerik:GridBoundColumn DataField="Value" HeaderText="Ps có VNĐ" DataType="System.Float" ShowFilterIcon="true"/>
                    
                    <telerik:GridBoundColumn DataField="Description" HeaderText="Diễn giải"
                        DataType="System.String" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false"/>
                    
                    <telerik:GridButtonColumn ConfirmText="Xóa giấy báo này?" ConfirmDialogType="RadWindow"
                        ConfirmTitle="" ButtonType="ImageButton" CommandName="Delete" Text="Xóa" ImageUrl="../../Content/images/delete.gif"
                        UniqueName="DeleteColumn">
                        <ItemStyle HorizontalAlign="Center"/>
                    </telerik:GridButtonColumn>

                </Columns>
                <PagerStyle Mode="NumericPages" />
            </MasterTableView>
            <ClientSettings>
                <Selecting AllowRowSelect="true" />
                <ClientEvents OnRowDblClick="RowDblClick" />
                <Scrolling UseStaticHeaders="true" SaveScrollPosition="true" FrozenColumnsCount="2"/>
            </ClientSettings>
        </telerik:RadGrid>

        <div class="button">
            <telerik:RadButton ID="bAccept" runat="server" Text="Chấp nhận" Width="100px"></telerik:RadButton>
            <telerik:RadButton ID="bPrint" runat="server" Text="In" Width="100px"></telerik:RadButton>
            <telerik:RadButton ID="bClose" runat="server" Text="Hủy bỏ" Width="100px"></telerik:RadButton>
        </div>
    </form>
</asp:Content>

